<?php


namespace App\Validate\Admin;


use App\Http\Request;

class CollectAccount extends Request
{
    /**
     * 验证规则
     */
    protected $rule = [
        'account_id' => 'required|numeric',
        'bank_id' => 'required|numeric',
        'sub_branch' => 'required',
        'account_name' => 'required',
        'card_number' => 'required'
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'account_id.required' => '请选择账户',
        'bank_id.required' => '请选择开户行',
        'sub_branch.required' => '请输入支行',
        'account_name.required' => '请输入账户名',
        'card_number.required' => '请输入卡号'
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add_collect_account' => ['bank_id', 'sub_branch', 'account_name', 'card_number'],
        'edit_collect_account' => ['account_id', 'bank_id', 'sub_branch', 'account_name', 'card_number'],
    ];
}
